<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>协议 | MPUSH</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="gitbook/style.css">
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="./chapter4.html" />
    
    
    <link rel="prev" href="./chapter2.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="3"
        data-chapter-title="协议"
        data-filepath="chapter3.md"
        data-basepath="."
        data-revision="Tue Mar 08 2016 15:09:44 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="./index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="chapter1.html">
            
                
                    <a href="./chapter1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        系统架构
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2" data-path="chapter2.html">
            
                
                    <a href="./chapter2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        服务依赖关系
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="3" data-path="chapter3.html">
            
                
                    <a href="./chapter3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        协议
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4" data-path="chapter4.html">
            
                
                    <a href="./chapter4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        主要流程
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="chapter6.html">
            
                
                    <a href="./chapter6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        密钥交换方案
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="chapter7.html">
            
                
                    <a href="./chapter7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        握手及快速重连
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="chapter8.html">
            
                
                    <a href="./chapter8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        绑定用户及路由发布
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="chapter9.html">
            
                
                    <a href="./chapter9.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        解绑用户
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="chapter10.html">
            
                
                    <a href="./chapter10.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        消息推送
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="chapter11.html">
            
                
                    <a href="./chapter11.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.6.</b>
                        
                        Http代理
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="./" >MPUSH</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x534F;&#x8BAE;">&#x534F;&#x8BAE;</h1>
<h3 id="&#x6570;&#x636E;&#x7ED3;&#x6784;">&#x6570;&#x636E;&#x7ED3;&#x6784;</h3>
<p>  <img src="MPush&#x6570;&#x636E;&#x5305;&#x7ED3;&#x6784;&#x56FE;.png" alt=""></p>
<h3 id="header&#x8BF4;&#x660E;">Header&#x8BF4;&#x660E;</h3>
<ol>
<li>length&#x8868;&#x793A;body&#x7684;&#x957F;&#x5EA6;</li>
<li>cmd&#x8868;&#x793A;&#x534F;&#x8BAE;&#x6D88;&#x606F;&#x7C7B;&#x578B;</li>
<li>checkcode&#x662F;&#x6839;&#x636E;body&#x751F;&#x6210;&#x7684;&#x4E00;&#x4E2A;&#x6821;&#x9A8C;&#x7801;</li>
<li>flags&#x8868;&#x793A;&#x5F53;&#x524D;&#x5305;&#x4F7F;&#x7528;&#x7684;&#x4E00;&#x4E9B;&#x7279;&#x6027;&#xFF0C;&#x6BD4;&#x5982;&#x662F;&#x5426;&#x542F;&#x7528;&#x52A0;&#x5BC6;&#xFF0C;&#x662F;&#x5426;&#x542F;&#x7528;&#x538B;&#x7F29;</li>
<li>sessionId&#x6D88;&#x606F;&#x4F1A;&#x8BDD;&#x6807;&#x8BC6;&#x7528;&#x4E8E;&#x6D88;&#x606F;&#x54CD;&#x5E94;</li>
<li>lrc&#x7528;&#x4E8E;&#x6821;&#x9A8C;header</li>
</ol>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="./chapter2.html" class="navigation navigation-prev " aria-label="Previous page: 服务依赖关系"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="./chapter4.html" class="navigation navigation-next " aria-label="Next page: 主要流程"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="gitbook/app.js"></script>

    
    <script src="gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
